#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int F(int n, int k)
{
	if (k > 0)
	{
		return F(n, k-1) * n;
	}
	else if(0 == k)
	{
		return n;
	}
	else
	{
		return (1.0 / F(n, -k));
	}
}

int main()
{
	int n = 0;
	int k = 0;
	scanf("%d %d", &n,&k);
	printf("%d",F(n, k));
	return 0;
}